Skip to content

[codex] complete controlled widget state behavior#33

Draft
ola-893 wants to merge 4 commits into
worka-ai:mainfrom
ola-893:feat/widget-state-completeness
Draft

[codex] complete controlled widget state behavior#33
ola-893 wants to merge 4 commits into
worka-ai:mainfrom
ola-893:feat/widget-state-completeness

Conversation

@ola-893
Copy link
Copy Markdown

@ola-893 ola-893 commented May 24, 2026

Summary

Completes several controlled widget state behaviors and removes serialization panic paths in example widget actions.

  • Adds controlled DatePicker month navigation fields and docs
  • Wires NumberInput text changes through number payload parsing
  • Adds indeterminate CircularProgress rotation support
  • Adds Drawer enter/fade transitions and modal/drawer focus barriers
  • Replaces example action serialization unwraps with recoverable fallbacks

Why

These widgets exposed controlled state fields but had incomplete behavior for common interactions. Some example action payload creation also used infallible serialization assumptions.

Impact

Applications can now drive DatePicker navigation explicitly, NumberInput text edits can update numeric state, and modal surfaces trap focus more consistently.

Validation

  • cargo check -p fission-widgets --lib --locked --offline
  • cargo test -p fission-core --test input_controller_tests test_number_input_type_filters_ime_commit --locked --offline --quiet -- --nocapture
  • cargo check -p inbox --locked --offline
  • cargo check -p fission-editor --locked --offline

Copy link
Copy Markdown
Contributor

@zcourts zcourts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes before this can be merged.

There are a few architectural/behavioral issues in this patch:

  1. crates/core/fission-core/src/input/text.rs changes the generic TextInputController so any TextInputType::Number serializes change payloads as f32. That makes the generic text controller infer action payload type from keyboard semantics, which is too broad. A numeric keyboard hint should not silently change the type contract for every text input using it. The typed conversion should live in NumberInput or in an explicitly typed action path.

  2. Several editor example actions change from explicit serialization failure to .unwrap_or_default(). That silently dispatches an empty/default payload if serialization fails. We should not merge silent fallback behavior into action dispatch paths. Either keep the failure explicit, or use a typed helper/macro path that makes the envelope construction reliable without swallowing errors.

  3. The hit-test/paint-blocking work needs runtime-level coverage around actual dispatch behavior. The unit tests prove raw hit-test IDs, but this patch changes how paint nodes can block backdrop interactions, so it should also prove that the intended backdrop/action dispatch still reaches the right semantic owner.

  4. CircularProgress indeterminate animation appears to require an explicit id. If that is the intended contract, document it and add a test. If not, the widget should provide a stable identity path or fail loudly instead of silently rendering non-animated.

I did not merge this because it is draft and the above needs to be addressed against current main.

@ola-893 ola-893 force-pushed the feat/widget-state-completeness branch from 5ad9660 to 6f9d9f3 Compare May 26, 2026 13:16
@ola-893 ola-893 force-pushed the feat/widget-state-completeness branch from 6f9d9f3 to f33c225 Compare May 26, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants